<?php require VIEWPATH. ADMIN_DIR. DIRECTORY_SEPARATOR. 'header.php'?>
<div class="page-header">
    <h1>资源预览</h1>
</div>
<div style="height: 40vw;">
    <?php if('pdf' === $sourceFormat): ?>
        <div id="handout_wrap_inner"></div>
    <?php else: ?>
        <iframe
            src='https://view.officeapps.live.com/op/view.aspx?src=<?= $sourceSrc ?>'
            width='100%' height='100%' frameborder='1'>
        </iframe>
    <?php endif ?>
</div>
<?php require VIEWPATH. ADMIN_DIR. DIRECTORY_SEPARATOR. 'footer.php'?>
<script type="text/javascript">  
    $('#handout_wrap_inner').media({
		width: '100%',
		height: '750px',
		autoplay: true,
        src:'<?= $sourceSrc ?>',
    }); 
</script>